<template>
  <view class="container">
    <view class="content">
      <view class="icon">
        <i class="iconfont icon-baojing"></i>
      </view>
      <view class="status">审核通过</view>
      <view class="time">感谢您的申请，祝您工作顺利</view>

      <view class="againCheck" @click="handleBack">返回首页</view>
    </view>
  </view>
</template>

<script setup>
import CustomNav from "@/components/CustomNav/index.vue";
import { setItem } from "@/utils/localStorage";
import { onShow, onHide, onLoad } from "@dcloudio/uni-app";

const handleBack = () => {
  uni.reLaunch({
    url: "/pages/index/index",
  });

  // 审核成功
  setItem("isApplyOrder", 2);
};

// 离开（说明用户已经看了）（不再展示申请接单选项）
onShow(() => {
  // setItem("isShowApplyOrder", -1)   // 1 申请接单不展示了
});
// 不知道为什么onHide不回调函数触发
// onHide(() => {
//   setItem("isShowApplyOrder", -1)   // -1 申请接单不展示了
// })
</script>

<style lang="scss" scoped>
.container {
  display: flex;
  width: 750rpx;
  min-height: 50vh;
  // align-items: center;
  justify-content: center;

  .content {
    width: 100%;
    padding: 400rpx 80rpx;
    text-align: center;

    .icon {
      margin-bottom: 30rpx;

      .iconfont {
        font-size: 100rpx;
        color: #19d56c;
      }

      .icon-fabu {
      }
    }

    .status {
      font-weight: 900;
      font-size: 36rpx;
      margin-bottom: 10rpx;
    }

    .time {
      color: #b0b0b0;
      font-size: 28rpx;
    }

    .againCheck {
      width: 100%;
      background-color: $theme;
      border-radius: 50rpx;
      display: flex;
      align-items: center;
      justify-content: center;
      // position: fixed;
      // z-index: 999;
      // left: 50%;
      margin-top: 60rpx;
      bottom: 50rpx;
      // transform: translateX(-50%);
      color: $white;
      font-size: 30rpx;
      padding: 27rpx 0;
      box-shadow: 0 5rpx 30px #4296ff4f;
    }
  }
}
</style>
